execute if score game_loading system matches -2147483648..2147483647 run scoreboard players add game_loading system 1

#重置虚空区域
execute if score game_loading system matches 0..20 store result bossbar game_starting value run scoreboard players get game_loading system
execute if score game_loading system matches 19 run bossbar set game_starting name "游戏加载中...正在清理虚空区域"
execute if score game_loading system matches 20 run fill 140 -64 305 240 60 206 air

#---
execute if score game_loading system matches 21 run bossbar set game_starting name "游戏加载中..."
execute if score game_loading system matches 22..30 store result bossbar game_starting value run scoreboard players get game_loading system


#blue Team Reset
execute if score game_loading system matches 32..49 store result bossbar game_starting value run scoreboard players get game_loading system
execute if score game_loading system matches 49 run bossbar set game_starting name "游戏加载中...正在放置蓝色方地图"
execute if score game_loading system matches 50 run place template vs:map_red_nointeractions 243 -64 437 180
execute if score game_loading system matches 55 run setblock 193 21 414 minecraft:blue_stained_glass_pane

#---
execute if score game_loading system matches 51 run bossbar set game_starting name "游戏加载中..."
execute if score game_loading system matches 51..60 store result bossbar game_starting value run scoreboard players get game_loading system

#red Team Reset
execute if score game_loading system matches 62 run bossbar set game_starting name "游戏加载中..."
execute if score game_loading system matches 62..80 store result bossbar game_starting value run scoreboard players get game_loading system
execute if score game_loading system matches 80 run bossbar set game_starting name "游戏加载中...正在放置红色方地图"
execute if score game_loading system matches 81 run place template vs:map_red_nointeractions 143 -64 74

#---
execute if score game_loading system matches 82 run bossbar set game_starting name "游戏加载中..."
execute if score game_loading system matches 82..100 store result bossbar game_starting value run scoreboard players get game_loading system

#SUCCESS
execute if score game_loading system matches 100 run bossbar set game_starting name {"text": "加载完成","color": "green","bold":true}
execute if score game_loading system matches 100 as @a at @s run playsound entity.arrow.hit_player

#---
execute if score game_loading system matches 120 run bossbar set game_starting players
execute if score game_loading system matches 120 run title @a title {"text": "§5VOID§r STREAM","color": "#002ea2","bold": true}
execute if score game_loading system matches 120 run execute as @a at @s run playsound block.beacon.power_select master

#CountDown
execute if score game_loading system matches 140 run title @a subtitle {"text": "5","color": "green"}
execute if score game_loading system matches 140 as @a at @s run playsound block.note_block.hat
execute if score game_loading system matches 160 run title @a subtitle {"text": "4","color": "green"}
execute if score game_loading system matches 160 as @a at @s run playsound block.note_block.hat
execute if score game_loading system matches 180 run title @a title {"text": "§5VOID§r STREAM","color": "#002ea2","bold": true}
execute if score game_loading system matches 180 run title @a subtitle {"text": "3","color": "yellow"}
execute if score game_loading system matches 180 as @a at @s run playsound block.note_block.hat
execute if score game_loading system matches 200 run title @a subtitle {"text": "2","color": "yellow"}
execute if score game_loading system matches 200 as @a at @s run playsound block.note_block.hat
execute if score game_loading system matches 220 run title @a subtitle {"text": "1","color": "red"}
execute if score game_loading system matches 220 as @a at @s run playsound block.note_block.hat

#Start
execute if score game_loading system matches 240.. as @a at @s run playsound block.note_block.pling
execute if score game_loading system matches 240.. run function vs:system/game/start